def longestCommonPrefix(self, strs):
  if not strs:return ""
  s1=min(strs)
  s2=max(strs)
  for index,value in enumerate(s1):
    if s2[index]!=value:return s2[:index]
  return s1